package cn.zc.auth.service.api;

import cn.tools.core.base.R;
import cn.zc.auth.service.api.biz.AuthStudentBiz;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 学生注册登录接口
 */
@Api(tags = "auth接口")
@RestController
@RequestMapping("/auth")
public class AuthStudentController {

    @Resource
    private AuthStudentBiz authStudentBiz;

    /**
     * 学生登录接口
     * @param userName
     * @param passWord
     * @return
     */
    @ApiOperation(value = "学生登录接口")
    @PostMapping("/studentPassLogin")
    private R<Object> studentPassLogin(String userName,String passWord){
        return R.success(authStudentBiz.passLogin(userName,passWord));
    }

    /**
     * 用于检查学生是否购买了此课程，是否要返回目录数据给他
     * @param classIfyId
     * @param request
     * @return
     */
//    @ApiOperation(value = "判断学生是否可以查阅此课程")
//    @PostMapping("/testedStudent")
//    private Boolean testedStudent(String classIfyId, HttpServletRequest request){
//        return authStudentBiz.testedStudent(classIfyId,request);
//    }
}
